package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "permissions")
public class Permissions extends BaseEntity implements Serializable {
    /**
     * 权限编号
     */
    @TableId(value = "PERMISSIONS_ID", type = IdType.AUTO)
    private Integer permissionsId;

    /**
     * 权限名称
     */
    @TableField(value = "PERMISSIONS_NAME")
    private String permissionsName;

    /**
     * 接口访问路径
     */
    @TableField(value = "INTERFACE_URL")
    private String interfaceUrl;

    /**
     * 状态
     */
    @TableField(value = "STATUS")
    private int status;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "CREATION_TIME")
    private Date creationTime;

    /**
     * 创建者编号
     */

    @TableField(value = "CREATOR_ID")
    private Integer creatorId;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY")
    private Integer updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "UPDATE_TIME")
    private Date updateTime;
    @TableField(exist = false)
    private Role role;
    private static final long serialVersionUID = 1L;

    public static final String COL_PERMISSIONS_ID = "PERMISSIONS_ID";

    public static final String COL_PERMISSIONS_NAME = "PERMISSIONS_NAME";

    public static final String COL_INTERFACE_URL = "INTERFACE_URL";

    public static final String COL_STATUS="STATUS";

    public static final String COL_CREATION_TIME = "CREATION_TIME";

    public static final String COL_CREATOR_ID = "CREATOR_ID";

    public static final String COL_UPDATE_BY = "UPDATE_BY";

    public static final String COL_UPDATE_TIME = "UPDATE_TIME";
}
